package com.meihuayishu.backend.dto;

import jakarta.validation.constraints.*;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import io.swagger.v3.oas.annotations.media.Schema;
import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.List;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(description = "占卜记录保存请求")
public class SaveDivinationRecordRequest {
    
    @Schema(description = "占卜ID", example = "div_1704096900012")
    private String divinationId;
    
    @NotBlank(message = "占卜问题不能为空")
    @Size(max = 200, message = "占卜问题不能超过200字符")
    @Schema(description = "占卜问题", example = "今年的事业发展怎么样？")
    private String question;
    
    @NotBlank(message = "卦象编码不能为空")
    @Schema(description = "卦象编码", example = "HUO_TIAN_DA_YOU")
    private String hexagramCode;
    
    @NotBlank(message = "占卜类型不能为空")
    @Schema(description = "占卜类型", allowableValues = {"TIME", "NUMBER", "IMAGE", "TEXT"})
    private String divinationType;
    
    @Schema(description = "算法类型", example = "TEXT_HASH")
    private String algorithm;
    
    @Schema(description = "输入数据")
    private Map<String, Object> inputData;
    
    @Schema(description = "卦象数据")
    private Map<String, Object> hexagramData;
    
    @Schema(description = "AI解读ID", example = "ai_1704097200123")
    private String aiInterpretationId;
    
    @Schema(description = "标签")
    private List<String> tags;
    
    @Schema(description = "是否私有", example = "false")
    private Boolean isPrivate = false;
}